meson: Fix check for builtype arguments
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 3 Apr 2020 12:02:51 +0000 (17:32 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 3 Apr 2020 13:11:55 +0000 (18:41 +0530)
commiteaef24c527833232bd4725789b0f35304de8123b
treecc55814b1b32ff4f2b1c658b0f9028067e5ac7fb
parent777435c4708713f74279a02fb51910b1fbc841b4
meson: Fix check for builtype arguments

`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
meson.build